From: Dario Faggioli Date: Thu, 15 Sep 2016 11:35:04 +0000 (+0100) Subject: xen: credit2: properly schedule migration of a running vcpu. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~397 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=115e4c5e52c14c126cd8ae0dfe0322c95b65e3c8;p=xen.git xen: credit2: properly schedule migration of a running vcpu. If wanting to migrate a vcpu that is actually running, we need to ask the scheduler to chime in as soon as possible, to have the vcpu itself stopped and actually moved. Make sure this happens by, after setting all the relevant flags, raising the scheduler softirq. Signed-off-by: Dario Faggioli Acked-by: George Dunlap --- diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index a5a744fd57..12dfd20a4c 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -1667,6 +1667,7 @@ static void migrate(const struct scheduler *ops, svc->migrate_rqd = trqd; __set_bit(_VPF_migrating, &svc->vcpu->pause_flags); __set_bit(__CSFLAG_runq_migrate_request, &svc->flags); + cpu_raise_softirq(svc->vcpu->processor, SCHEDULE_SOFTIRQ); SCHED_STAT_CRANK(migrate_requested); } else